package online.inote.modules.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import online.inote.common.base.BaseController;
import online.inote.common.utils.ResultFactory;
import online.inote.common.utils.ResultFactory.ResultEnum;
import online.inote.modules.demo.entity.DemoEntity;

/**
 * <p>
 * Desc: 
 * </p>
 *
 * @author XQF SUI
 * @created 2018年1月30日 上午9:41:57
 * @version 1.0
 */
@Controller
@RequestMapping("demo")
public class DemoController extends BaseController<DemoEntity> {

	@ResponseBody
	@RequestMapping(value = "test", method = RequestMethod.POST)
	public String test() {
		return ResultFactory.createResultJSON(ResultEnum.SUCCESS, service.selectAll());
	}
}
